package jmu.cyxwcy.librarymanagement.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;

import java.math.BigDecimal;
import java.time.LocalDate;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author 
 * @since 2024-06-25
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("borrowing")
public class Borrowing implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "borrowing_id", type = IdType.AUTO)
    private Integer borrowingId;

    private Long bookId;

    private Integer userId;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date borrowDate;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date returnDate;

    private String renewalStatus;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date dueDate;

    @TableField(exist = false)
    private String fineId;
    @TableField(exist = false)
    private String studentId;
    @TableField(exist = false)
    private String teacherId;
    @TableField(exist = false)
    private String bookName;
    @TableField(exist = false)
    private String isbn;
    @TableField(exist = false)
    private String description;
    @TableField(exist = false)
    private String language;

    @TableField(exist = false)
    private String studentName;
    @TableField(exist = false)
    private String teacherName;
    @TableField(exist = false)
    private BigDecimal totalAmount;
    @TableField(exist = false)
    private LocalDate generatedDate;
    @TableField(exist = false)
    private String paymentStatus;
    @TableField(exist = false)

    private String className;
    @TableField(exist = false)
    private String classId;
    @TableField(exist = false)

    private String majorName;
    @TableField(exist = false)
    private String majorId;
    @TableField(exist = false)

    private String collegeName;
    @TableField(exist = false)
    private String collegeId;
    @TableField(exist = false)

    private String categoryName;
    @TableField(exist = false)
    private String categoryId;

    @TableField(exist = false)
    private String username;

    @TableField(exist = false)
    private String email;
    @TableField(exist = false)
    private String status;
}
